/*******************************************************************************
 * Copyright (c) 2006 CEA List.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     CEA List - initial API and implementation
 *******************************************************************************/
package com.cea.papyrus.diagram.activity.figure;

import org.eclipse.draw2d.Ellipse;
import org.eclipse.draw2d.Graphics;
import org.eclipse.draw2d.geometry.Rectangle;
import org.eclipse.swt.graphics.RGB;

import com.cea.papyrus.core.PapyrusPlugin;

/**
 * ActivityFinalNodeFigure.
 * 
 * @author Sylvain Robert
 * @since 10 apr. 07
 */
public class ActivityFinalNodeFigure extends Ellipse{
 
	/**
     * Default Constructor.
     */
    public ActivityFinalNodeFigure(){
    	super();
    }

    /*(non-javadoc)
     * @see org.eclipse.draw2d.Shape#fillShape(org.eclipse.draw2d.Graphics)
     */
   @Override
    protected void fillShape(Graphics graphics){
    	final int space = 5;
		graphics.pushState();
        Rectangle f = Rectangle.SINGLETON;
        Rectangle r = getBounds();
        f.x = r.x + space;
        f.y = r.y + space;
        f.width = r.width - space * 2;
        f.height = r.height - space * 2;
		graphics.setBackgroundColor(PapyrusPlugin.colorManager.get(new RGB(157,124,47))) ;
        graphics.fillOval(f);
        graphics.popState();
   }
}